include_directories("D:/Program Files/Microsoft DirectX SDK (June 2010)/Include")
link_directories("D:/Program Files/Microsoft DirectX SDK (June 2010)/Lib/x86")

add_subdirectory(Engine2D)

set(EXE SuperMario)
set(SRCS 
    main.cpp 
    mariogame.cpp
    objectmanager.cpp
    staticobject.cpp
    dynamicobject.cpp 
    coin.cpp
    mushroom.cpp 
    turtle.cpp 
    enemy.cpp 
    mario.cpp)
if (MSVC_IDE)
    set(SRCS ${SRCS} 
        mariogame.h
        objectmanager.h
        staticobject.h
        dynamicobject.h
        coin.h
        mushroom.h
        turtle.h
        enemy.h
        mario.h)
endif (MSVC_IDE)
set(LIBS Engine2D)
    
add_executable(${EXE} ${SRCS})
target_link_libraries(${EXE} ${LIBS})

if (NOT MSVC_IDE)
    set(CMAKE_EXE_LINKER_FLAGS "-static -mwindows")
    set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})

    install(TARGETS SuperMario DESTINATION ./)
endif (NOT MSVC_IDE)